<?php
if (session_id() == "") session_start(); // Initialize Session data
ob_start(); // Turn on output buffering
?>
<?php include_once "ewcfg10.php" ?>
<?php include_once "ewmysql10.php" ?>
<?php include_once "phpfn10.php" ?>
<?php include_once "veh_vehiculosinfo.php" ?>
<?php include_once "usuariosinfo.php" ?>
<?php include_once "vehiculo_cubiertasgridcls.php" ?>
<?php include_once "veh_vehiculo_sucursalgridcls.php" ?>
<?php include_once "userfn10.php" ?>
<?php

//
// Page class
//

$veh_vehiculos_view = NULL; // Initialize page object first

class cveh_vehiculos_view extends cveh_vehiculos {

	// Page ID
	var $PageID = 'view';

	// Project ID
	var $ProjectID = "{0CD3A63A-80C7-457D-BA57-0B97D2A745A8}";

	// Table name
	var $TableName = 'veh_vehiculos';

	// Page object name
	var $PageObjName = 'veh_vehiculos_view';

	// Page name
	function PageName() {
		return ew_CurrentPage();
	}

	// Page URL
	function PageUrl() {
		$PageUrl = ew_CurrentPage() . "?";
		if ($this->UseTokenInUrl) $PageUrl .= "t=" . $this->TableVar . "&"; // Add page token
		return $PageUrl;
	}

	// Page URLs
	var $AddUrl;
	var $EditUrl;
	var $CopyUrl;
	var $DeleteUrl;
	var $ViewUrl;
	var $ListUrl;

	// Export URLs
	var $ExportPrintUrl;
	var $ExportHtmlUrl;
	var $ExportExcelUrl;
	var $ExportWordUrl;
	var $ExportXmlUrl;
	var $ExportCsvUrl;
	var $ExportPdfUrl;

	// Update URLs
	var $InlineAddUrl;
	var $InlineCopyUrl;
	var $InlineEditUrl;
	var $GridAddUrl;
	var $GridEditUrl;
	var $MultiDeleteUrl;
	var $MultiUpdateUrl;

	// Message
	function getMessage() {
		return @$_SESSION[EW_SESSION_MESSAGE];
	}

	function setMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_MESSAGE], $v);
	}

	function getFailureMessage() {
		return @$_SESSION[EW_SESSION_FAILURE_MESSAGE];
	}

	function setFailureMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_FAILURE_MESSAGE], $v);
	}

	function getSuccessMessage() {
		return @$_SESSION[EW_SESSION_SUCCESS_MESSAGE];
	}

	function setSuccessMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_SUCCESS_MESSAGE], $v);
	}

	function getWarningMessage() {
		return @$_SESSION[EW_SESSION_WARNING_MESSAGE];
	}

	function setWarningMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_WARNING_MESSAGE], $v);
	}

	// Show message
	function ShowMessage() {
		$hidden = FALSE;
		$html = "";

		// Message
		$sMessage = $this->getMessage();
		$this->Message_Showing($sMessage, "");
		if ($sMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sMessage;
			$html .= "<div class=\"alert alert-success ewSuccess\">" . $sMessage . "</div>";
			$_SESSION[EW_SESSION_MESSAGE] = ""; // Clear message in Session
		}

		// Warning message
		$sWarningMessage = $this->getWarningMessage();
		$this->Message_Showing($sWarningMessage, "warning");
		if ($sWarningMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sWarningMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sWarningMessage;
			$html .= "<div class=\"alert alert-warning ewWarning\">" . $sWarningMessage . "</div>";
			$_SESSION[EW_SESSION_WARNING_MESSAGE] = ""; // Clear message in Session
		}

		// Success message
		$sSuccessMessage = $this->getSuccessMessage();
		$this->Message_Showing($sSuccessMessage, "success");
		if ($sSuccessMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sSuccessMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sSuccessMessage;
			$html .= "<div class=\"alert alert-success ewSuccess\">" . $sSuccessMessage . "</div>";
			$_SESSION[EW_SESSION_SUCCESS_MESSAGE] = ""; // Clear message in Session
		}

		// Failure message
		$sErrorMessage = $this->getFailureMessage();
		$this->Message_Showing($sErrorMessage, "failure");
		if ($sErrorMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sErrorMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sErrorMessage;
			$html .= "<div class=\"alert alert-error ewError\">" . $sErrorMessage . "</div>";
			$_SESSION[EW_SESSION_FAILURE_MESSAGE] = ""; // Clear message in Session
		}
		echo "<table class=\"ewStdTable\"><tr><td><div class=\"ewMessageDialog\"" . (($hidden) ? " style=\"display: none;\"" : "") . ">" . $html . "</div></td></tr></table>";
	}
	var $PageHeader;
	var $PageFooter;

	// Show Page Header
	function ShowPageHeader() {
		$sHeader = $this->PageHeader;
		$this->Page_DataRendering($sHeader);
		if ($sHeader <> "") { // Header exists, display
			echo "<p>" . $sHeader . "</p>";
		}
	}

	// Show Page Footer
	function ShowPageFooter() {
		$sFooter = $this->PageFooter;
		$this->Page_DataRendered($sFooter);
		if ($sFooter <> "") { // Footer exists, display
			echo "<p>" . $sFooter . "</p>";
		}
	}

	// Validate page request
	function IsPageRequest() {
		global $objForm;
		if ($this->UseTokenInUrl) {
			if ($objForm)
				return ($this->TableVar == $objForm->GetValue("t"));
			if (@$_GET["t"] <> "")
				return ($this->TableVar == $_GET["t"]);
		} else {
			return TRUE;
		}
	}

	//
	// Page class constructor
	//
	function __construct() {
		global $conn, $Language;
		$GLOBALS["Page"] = &$this;

		// Language object
		if (!isset($Language)) $Language = new cLanguage();

		// Parent constuctor
		parent::__construct();

		// Table object (veh_vehiculos)
		if (!isset($GLOBALS["veh_vehiculos"]) || get_class($GLOBALS["veh_vehiculos"]) == "cveh_vehiculos") {
			$GLOBALS["veh_vehiculos"] = &$this;
			$GLOBALS["Table"] = &$GLOBALS["veh_vehiculos"];
		}
		$KeyUrl = "";
		if (@$_GET["VehiculoId"] <> "") {
			$this->RecKey["VehiculoId"] = $_GET["VehiculoId"];
			$KeyUrl .= "&amp;VehiculoId=" . urlencode($this->RecKey["VehiculoId"]);
		}
		$this->ExportPrintUrl = $this->PageUrl() . "export=print" . $KeyUrl;
		$this->ExportHtmlUrl = $this->PageUrl() . "export=html" . $KeyUrl;
		$this->ExportExcelUrl = $this->PageUrl() . "export=excel" . $KeyUrl;
		$this->ExportWordUrl = $this->PageUrl() . "export=word" . $KeyUrl;
		$this->ExportXmlUrl = $this->PageUrl() . "export=xml" . $KeyUrl;
		$this->ExportCsvUrl = $this->PageUrl() . "export=csv" . $KeyUrl;
		$this->ExportPdfUrl = $this->PageUrl() . "export=pdf" . $KeyUrl;

		// Table object (usuarios)
		if (!isset($GLOBALS['usuarios'])) $GLOBALS['usuarios'] = new cusuarios();

		// Page ID
		if (!defined("EW_PAGE_ID"))
			define("EW_PAGE_ID", 'view', TRUE);

		// Table name (for backward compatibility)
		if (!defined("EW_TABLE_NAME"))
			define("EW_TABLE_NAME", 'veh_vehiculos', TRUE);

		// Start timer
		if (!isset($GLOBALS["gTimer"])) $GLOBALS["gTimer"] = new cTimer();

		// Open connection
		if (!isset($conn)) $conn = ew_Connect();

		// Export options
		$this->ExportOptions = new cListOptions();
		$this->ExportOptions->Tag = "div";
		$this->ExportOptions->TagClassName = "ewExportOption";

		// Other options
		$this->OtherOptions['action'] = new cListOptions();
		$this->OtherOptions['action']->Tag = "div";
		$this->OtherOptions['action']->TagClassName = "ewActionOption";
		$this->OtherOptions['detail'] = new cListOptions();
		$this->OtherOptions['detail']->Tag = "div";
		$this->OtherOptions['detail']->TagClassName = "ewDetailOption";
	}

	// 
	//  Page_Init
	//
	function Page_Init() {
		global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;

		// Security
		$Security = new cAdvancedSecurity();
		if (!$Security->IsLoggedIn()) $Security->AutoLogin();
		if (!$Security->IsLoggedIn()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("login.php");
		}
		$this->CurrentAction = (@$_GET["a"] <> "") ? $_GET["a"] : @$_POST["a_list"]; // Set up current action
		$this->VehiculoId->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();

		// Global Page Loading event (in userfn*.php)
		Page_Loading();

		// Page Load event
		$this->Page_Load();
	}

	//
	// Page_Terminate
	//
	function Page_Terminate($url = "") {
		global $conn;

		// Page Unload event
		$this->Page_Unload();

		// Global Page Unloaded event (in userfn*.php)
		Page_Unloaded();
		$this->Page_Redirecting($url);

		 // Close connection
		$conn->Close();

		// Go to URL if specified
		if ($url <> "") {
			if (!EW_DEBUG_ENABLED && ob_get_length())
				ob_end_clean();
			header("Location: " . $url);
		}
		exit();
	}
	var $ExportOptions; // Export options
	var $OtherOptions = array(); // Other options
	var $DisplayRecs = 1;
	var $StartRec;
	var $StopRec;
	var $TotalRecs = 0;
	var $RecRange = 10;
	var $RecCnt;
	var $RecKey = array();
	var $Recordset;

	//
	// Page main
	//
	function Page_Main() {
		global $Language;

		// Load current record
		$bLoadCurrentRecord = FALSE;
		$sReturnUrl = "";
		$bMatchRecord = FALSE;

		// Set up Breadcrumb
		if ($this->Export == "")
			$this->SetupBreadcrumb();
		if ($this->IsPageRequest()) { // Validate request
			if (@$_GET["VehiculoId"] <> "") {
				$this->VehiculoId->setQueryStringValue($_GET["VehiculoId"]);
				$this->RecKey["VehiculoId"] = $this->VehiculoId->QueryStringValue;
			} else {
				$sReturnUrl = "veh_vehiculoslist.php"; // Return to list
			}

			// Get action
			$this->CurrentAction = "I"; // Display form
			switch ($this->CurrentAction) {
				case "I": // Get a record to display
					if (!$this->LoadRow()) { // Load record based on key
						if ($this->getSuccessMessage() == "" && $this->getFailureMessage() == "")
							$this->setFailureMessage($Language->Phrase("NoRecord")); // Set no record message
						$sReturnUrl = "veh_vehiculoslist.php"; // No matching record, return to list
					}
			}
		} else {
			$sReturnUrl = "veh_vehiculoslist.php"; // Not page request, return to list
		}
		if ($sReturnUrl <> "")
			$this->Page_Terminate($sReturnUrl);

		// Render row
		$this->RowType = EW_ROWTYPE_VIEW;
		$this->ResetAttrs();
		$this->RenderRow();

		// Set up detail parameters
		$this->SetUpDetailParms();
	}

	// Set up other options
	function SetupOtherOptions() {
		global $Language, $Security;
		$options = &$this->OtherOptions;
		$option = &$options["action"];

		// Add
		$item = &$option->Add("add");
		$item->Body = "<a class=\"ewAction ewAdd\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("ViewPageAddLink") . "</a>";
		$item->Visible = ($this->AddUrl <> "" && $Security->IsLoggedIn());

		// Edit
		$item = &$option->Add("edit");
		$item->Body = "<a class=\"ewAction ewEdit\" href=\"" . ew_HtmlEncode($this->EditUrl) . "\">" . $Language->Phrase("ViewPageEditLink") . "</a>";
		$item->Visible = ($this->EditUrl <> "" && $Security->IsLoggedIn());

		// Copy
		$item = &$option->Add("copy");
		$item->Body = "<a class=\"ewAction ewCopy\" href=\"" . ew_HtmlEncode($this->CopyUrl) . "\">" . $Language->Phrase("ViewPageCopyLink") . "</a>";
		$item->Visible = ($this->CopyUrl <> "" && $Security->IsLoggedIn());

		// Delete
		$item = &$option->Add("delete");
		$item->Body = "<a class=\"ewAction ewDelete\" href=\"" . ew_HtmlEncode($this->DeleteUrl) . "\">" . $Language->Phrase("ViewPageDeleteLink") . "</a>";
		$item->Visible = ($this->DeleteUrl <> "" && $Security->IsLoggedIn());
		$DetailTableLink = "";
		$option = &$options["detail"];

		// Detail table 'vehiculo_cubiertas'
		$body = $Language->TablePhrase("vehiculo_cubiertas", "TblCaption");
		$body = "<a class=\"ewAction ewDetailList\" href=\"" . ew_HtmlEncode("vehiculo_cubiertaslist.php?" . EW_TABLE_SHOW_MASTER . "=veh_vehiculos&VehiculoId=" . strval($this->VehiculoId->CurrentValue) . "") . "\">" . $body . "</a>";
		$item = &$option->Add("detail_vehiculo_cubiertas");
		$item->Body = $body;
		$item->Visible = $Security->IsLoggedIn();
		if ($item->Visible) {
			if ($DetailTableLink <> "") $DetailTableLink .= ",";
			$DetailTableLink .= "vehiculo_cubiertas";
		}

		// Detail table 'veh_vehiculo_sucursal'
		$body = $Language->TablePhrase("veh_vehiculo_sucursal", "TblCaption");
		$body = "<a class=\"ewAction ewDetailList\" href=\"" . ew_HtmlEncode("veh_vehiculo_sucursallist.php?" . EW_TABLE_SHOW_MASTER . "=veh_vehiculos&VehiculoId=" . strval($this->VehiculoId->CurrentValue) . "") . "\">" . $body . "</a>";
		$item = &$option->Add("detail_veh_vehiculo_sucursal");
		$item->Body = $body;
		$item->Visible = $Security->IsLoggedIn();
		if ($item->Visible) {
			if ($DetailTableLink <> "") $DetailTableLink .= ",";
			$DetailTableLink .= "veh_vehiculo_sucursal";
		}

		// Multiple details
		if ($this->ShowMultipleDetails) {
			$body = $Language->Phrase("MultipleMasterDetails");
			$body = "<a class=\"ewAction ewDetailView\" data-action=\"view\" href=\"" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailTableLink)) . "\">" . $body . "</a>";
			$item = &$option->Add("details");
			$item->Body = $body;
			$item->Visible = ($DetailTableLink <> "");

			// Hide single master/detail items
			$ar = explode(",", $DetailTableLink);
			$cnt = count($ar);
			for ($i = 0; $i < $cnt; $i++) {
				if ($item = &$option->GetItem("detail_" . $ar[$i]))
					$item->Visible = FALSE;
			}
		}

		// Set up options default
		foreach ($options as &$option) {
			$option->UseDropDownButton = FALSE;
			$option->UseButtonGroup = TRUE;
			$item = &$option->Add($option->GroupOptionName);
			$item->Body = "";
			$item->Visible = FALSE;
		}
		$options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
		$options["action"]->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
	}

	// Set up starting record parameters
	function SetUpStartRec() {
		if ($this->DisplayRecs == 0)
			return;
		if ($this->IsPageRequest()) { // Validate request
			if (@$_GET[EW_TABLE_START_REC] <> "") { // Check for "start" parameter
				$this->StartRec = $_GET[EW_TABLE_START_REC];
				$this->setStartRecordNumber($this->StartRec);
			} elseif (@$_GET[EW_TABLE_PAGE_NO] <> "") {
				$PageNo = $_GET[EW_TABLE_PAGE_NO];
				if (is_numeric($PageNo)) {
					$this->StartRec = ($PageNo-1)*$this->DisplayRecs+1;
					if ($this->StartRec <= 0) {
						$this->StartRec = 1;
					} elseif ($this->StartRec >= intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1) {
						$this->StartRec = intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1;
					}
					$this->setStartRecordNumber($this->StartRec);
				}
			}
		}
		$this->StartRec = $this->getStartRecordNumber();

		// Check if correct start record counter
		if (!is_numeric($this->StartRec) || $this->StartRec == "") { // Avoid invalid start record counter
			$this->StartRec = 1; // Reset start record counter
			$this->setStartRecordNumber($this->StartRec);
		} elseif (intval($this->StartRec) > intval($this->TotalRecs)) { // Avoid starting record > total records
			$this->StartRec = intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1; // Point to last page first record
			$this->setStartRecordNumber($this->StartRec);
		} elseif (($this->StartRec-1) % $this->DisplayRecs <> 0) {
			$this->StartRec = intval(($this->StartRec-1)/$this->DisplayRecs)*$this->DisplayRecs+1; // Point to page boundary
			$this->setStartRecordNumber($this->StartRec);
		}
	}

	// Load row based on key values
	function LoadRow() {
		global $conn, $Security, $Language;
		$sFilter = $this->KeyFilter();

		// Call Row Selecting event
		$this->Row_Selecting($sFilter);

		// Load SQL based on filter
		$this->CurrentFilter = $sFilter;
		$sSql = $this->SQL();
		$res = FALSE;
		$rs = ew_LoadRecordset($sSql);
		if ($rs && !$rs->EOF) {
			$res = TRUE;
			$this->LoadRowValues($rs); // Load row values
			$rs->Close();
		}
		return $res;
	}

	// Load row values from recordset
	function LoadRowValues(&$rs) {
		global $conn;
		if (!$rs || $rs->EOF) return;

		// Call Row Selected event
		$row = &$rs->fields;
		$this->Row_Selected($row);
		$this->VehiculoId->setDbValue($rs->fields('VehiculoId'));
		$this->VehiculoDominio->setDbValue($rs->fields('VehiculoDominio'));
		$this->VehiculoTipo->setDbValue($rs->fields('VehiculoTipo'));
		$this->VehiculoDescripcion->setDbValue($rs->fields('VehiculoDescripcion'));
		$this->VehiculoSucursal->setDbValue($rs->fields('VehiculoSucursal'));
		$this->VehiculoFechaCompra->setDbValue($rs->fields('VehiculoFechaCompra'));
		$this->VehiculoProveedor->setDbValue($rs->fields('VehiculoProveedor'));
		$this->VehiculoMarca->setDbValue($rs->fields('VehiculoMarca'));
		$this->VehiculoModelo->setDbValue($rs->fields('VehiculoModelo'));
		$this->VehiculoVersion->setDbValue($rs->fields('VehiculoVersion'));
		$this->VehiculoChasis->setDbValue($rs->fields('VehiculoChasis'));
		$this->VehiculoMotor->setDbValue($rs->fields('VehiculoMotor'));
		$this->VehiculoCombustible->setDbValue($rs->fields('VehiculoCombustible'));
		$this->VehiculoTipoMedicion->setDbValue($rs->fields('VehiculoTipoMedicion'));
		$this->VehiculoCondicion->setDbValue($rs->fields('VehiculoCondicion'));
		$this->VehiculoKm->setDbValue($rs->fields('VehiculoKm'));
		$this->VehiculoFotoPrincipal->Upload->DbValue = $rs->fields('VehiculoFotoPrincipal');
		$this->VehiculoFotoPrincipal->CurrentValue = $this->VehiculoFotoPrincipal->Upload->DbValue;
		$this->VehiculoFoto2->Upload->DbValue = $rs->fields('VehiculoFoto2');
		$this->VehiculoFoto2->CurrentValue = $this->VehiculoFoto2->Upload->DbValue;
		$this->VehiculoFoto3->Upload->DbValue = $rs->fields('VehiculoFoto3');
		$this->VehiculoFoto3->CurrentValue = $this->VehiculoFoto3->Upload->DbValue;
		$this->VehiculoFoto4->Upload->DbValue = $rs->fields('VehiculoFoto4');
		$this->VehiculoFoto4->CurrentValue = $this->VehiculoFoto4->Upload->DbValue;
		$this->VehiculoFechaBaja->setDbValue($rs->fields('VehiculoFechaBaja'));
		$this->VehiculoMotivoBaja->setDbValue($rs->fields('VehiculoMotivoBaja'));
	}

	// Load DbValue from recordset
	function LoadDbValues(&$rs) {
		if (!$rs || !is_array($rs) && $rs->EOF) return;
		$row = is_array($rs) ? $rs : $rs->fields;
		$this->VehiculoId->DbValue = $row['VehiculoId'];
		$this->VehiculoDominio->DbValue = $row['VehiculoDominio'];
		$this->VehiculoTipo->DbValue = $row['VehiculoTipo'];
		$this->VehiculoDescripcion->DbValue = $row['VehiculoDescripcion'];
		$this->VehiculoSucursal->DbValue = $row['VehiculoSucursal'];
		$this->VehiculoFechaCompra->DbValue = $row['VehiculoFechaCompra'];
		$this->VehiculoProveedor->DbValue = $row['VehiculoProveedor'];
		$this->VehiculoMarca->DbValue = $row['VehiculoMarca'];
		$this->VehiculoModelo->DbValue = $row['VehiculoModelo'];
		$this->VehiculoVersion->DbValue = $row['VehiculoVersion'];
		$this->VehiculoChasis->DbValue = $row['VehiculoChasis'];
		$this->VehiculoMotor->DbValue = $row['VehiculoMotor'];
		$this->VehiculoCombustible->DbValue = $row['VehiculoCombustible'];
		$this->VehiculoTipoMedicion->DbValue = $row['VehiculoTipoMedicion'];
		$this->VehiculoCondicion->DbValue = $row['VehiculoCondicion'];
		$this->VehiculoKm->DbValue = $row['VehiculoKm'];
		$this->VehiculoFotoPrincipal->Upload->DbValue = $row['VehiculoFotoPrincipal'];
		$this->VehiculoFoto2->Upload->DbValue = $row['VehiculoFoto2'];
		$this->VehiculoFoto3->Upload->DbValue = $row['VehiculoFoto3'];
		$this->VehiculoFoto4->Upload->DbValue = $row['VehiculoFoto4'];
		$this->VehiculoFechaBaja->DbValue = $row['VehiculoFechaBaja'];
		$this->VehiculoMotivoBaja->DbValue = $row['VehiculoMotivoBaja'];
	}

	// Render row values based on field settings
	function RenderRow() {
		global $conn, $Security, $Language;
		global $gsLanguage;

		// Initialize URLs
		$this->AddUrl = $this->GetAddUrl();
		$this->EditUrl = $this->GetEditUrl();
		$this->CopyUrl = $this->GetCopyUrl();
		$this->DeleteUrl = $this->GetDeleteUrl();
		$this->ListUrl = $this->GetListUrl();
		$this->SetupOtherOptions();

		// Convert decimal values if posted back
		if ($this->VehiculoKm->FormValue == $this->VehiculoKm->CurrentValue && is_numeric(ew_StrToFloat($this->VehiculoKm->CurrentValue)))
			$this->VehiculoKm->CurrentValue = ew_StrToFloat($this->VehiculoKm->CurrentValue);

		// Call Row_Rendering event
		$this->Row_Rendering();

		// Common render codes for all row types
		// VehiculoId
		// VehiculoDominio
		// VehiculoTipo
		// VehiculoDescripcion
		// VehiculoSucursal
		// VehiculoFechaCompra
		// VehiculoProveedor
		// VehiculoMarca
		// VehiculoModelo
		// VehiculoVersion
		// VehiculoChasis
		// VehiculoMotor
		// VehiculoCombustible
		// VehiculoTipoMedicion
		// VehiculoCondicion
		// VehiculoKm
		// VehiculoFotoPrincipal
		// VehiculoFoto2
		// VehiculoFoto3
		// VehiculoFoto4
		// VehiculoFechaBaja
		// VehiculoMotivoBaja

		if ($this->RowType == EW_ROWTYPE_VIEW) { // View row

			// VehiculoId
			$this->VehiculoId->ViewValue = $this->VehiculoId->CurrentValue;
			$this->VehiculoId->ViewCustomAttributes = "";

			// VehiculoDominio
			$this->VehiculoDominio->ViewValue = $this->VehiculoDominio->CurrentValue;
			$this->VehiculoDominio->ViewCustomAttributes = "";

			// VehiculoTipo
			if (strval($this->VehiculoTipo->CurrentValue) <> "") {
				$sFilterWrk = "`TipoId`" . ew_SearchString("=", $this->VehiculoTipo->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `TipoId`, `TipoNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `veh_tipo`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoTipo, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoTipo->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoTipo->ViewValue = $this->VehiculoTipo->CurrentValue;
				}
			} else {
				$this->VehiculoTipo->ViewValue = NULL;
			}
			$this->VehiculoTipo->ViewCustomAttributes = "";

			// VehiculoDescripcion
			$this->VehiculoDescripcion->ViewValue = $this->VehiculoDescripcion->CurrentValue;
			$this->VehiculoDescripcion->ViewCustomAttributes = "";

			// VehiculoSucursal
			if (strval($this->VehiculoSucursal->CurrentValue) <> "") {
				$sFilterWrk = "`sucursalId`" . ew_SearchString("=", $this->VehiculoSucursal->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `sucursalId`, `sucursalNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sucursales`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoSucursal, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoSucursal->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoSucursal->ViewValue = $this->VehiculoSucursal->CurrentValue;
				}
			} else {
				$this->VehiculoSucursal->ViewValue = NULL;
			}
			$this->VehiculoSucursal->ViewCustomAttributes = "";

			// VehiculoFechaCompra
			$this->VehiculoFechaCompra->ViewValue = $this->VehiculoFechaCompra->CurrentValue;
			$this->VehiculoFechaCompra->ViewValue = ew_FormatDateTime($this->VehiculoFechaCompra->ViewValue, 7);
			$this->VehiculoFechaCompra->ViewCustomAttributes = "";

			// VehiculoProveedor
			if (strval($this->VehiculoProveedor->CurrentValue) <> "") {
				$sFilterWrk = "`ProveedorId`" . ew_SearchString("=", $this->VehiculoProveedor->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `ProveedorId`, `ProveedorNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `veh_proveedores`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoProveedor, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoProveedor->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoProveedor->ViewValue = $this->VehiculoProveedor->CurrentValue;
				}
			} else {
				$this->VehiculoProveedor->ViewValue = NULL;
			}
			$this->VehiculoProveedor->ViewCustomAttributes = "";

			// VehiculoMarca
			if (strval($this->VehiculoMarca->CurrentValue) <> "") {
				$sFilterWrk = "`MarcaId`" . ew_SearchString("=", $this->VehiculoMarca->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `MarcaId`, `MarcaNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `veh_marca`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoMarca, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoMarca->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoMarca->ViewValue = $this->VehiculoMarca->CurrentValue;
				}
			} else {
				$this->VehiculoMarca->ViewValue = NULL;
			}
			$this->VehiculoMarca->ViewCustomAttributes = "";

			// VehiculoModelo
			if (strval($this->VehiculoModelo->CurrentValue) <> "") {
				$sFilterWrk = "`ModeloId`" . ew_SearchString("=", $this->VehiculoModelo->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `ModeloId`, `ModeloNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `veh_modelo`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoModelo, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoModelo->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoModelo->ViewValue = $this->VehiculoModelo->CurrentValue;
				}
			} else {
				$this->VehiculoModelo->ViewValue = NULL;
			}
			$this->VehiculoModelo->ViewCustomAttributes = "";

			// VehiculoVersion
			if (strval($this->VehiculoVersion->CurrentValue) <> "") {
				$sFilterWrk = "`VersionId`" . ew_SearchString("=", $this->VehiculoVersion->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `VersionId`, `VersionNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `veh_version`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoVersion, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoVersion->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoVersion->ViewValue = $this->VehiculoVersion->CurrentValue;
				}
			} else {
				$this->VehiculoVersion->ViewValue = NULL;
			}
			$this->VehiculoVersion->ViewCustomAttributes = "";

			// VehiculoChasis
			$this->VehiculoChasis->ViewValue = $this->VehiculoChasis->CurrentValue;
			$this->VehiculoChasis->ViewCustomAttributes = "";

			// VehiculoMotor
			$this->VehiculoMotor->ViewValue = $this->VehiculoMotor->CurrentValue;
			$this->VehiculoMotor->ViewCustomAttributes = "";

			// VehiculoCombustible
			if (strval($this->VehiculoCombustible->CurrentValue) <> "") {
				$sFilterWrk = "`CombustibleId`" . ew_SearchString("=", $this->VehiculoCombustible->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `CombustibleId`, `CombustibleNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `veh_combustible`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoCombustible, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoCombustible->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoCombustible->ViewValue = $this->VehiculoCombustible->CurrentValue;
				}
			} else {
				$this->VehiculoCombustible->ViewValue = NULL;
			}
			$this->VehiculoCombustible->ViewCustomAttributes = "";

			// VehiculoTipoMedicion
			if (strval($this->VehiculoTipoMedicion->CurrentValue) <> "") {
				switch ($this->VehiculoTipoMedicion->CurrentValue) {
					case $this->VehiculoTipoMedicion->FldTagValue(1):
						$this->VehiculoTipoMedicion->ViewValue = $this->VehiculoTipoMedicion->FldTagCaption(1) <> "" ? $this->VehiculoTipoMedicion->FldTagCaption(1) : $this->VehiculoTipoMedicion->CurrentValue;
						break;
					case $this->VehiculoTipoMedicion->FldTagValue(2):
						$this->VehiculoTipoMedicion->ViewValue = $this->VehiculoTipoMedicion->FldTagCaption(2) <> "" ? $this->VehiculoTipoMedicion->FldTagCaption(2) : $this->VehiculoTipoMedicion->CurrentValue;
						break;
					case $this->VehiculoTipoMedicion->FldTagValue(3):
						$this->VehiculoTipoMedicion->ViewValue = $this->VehiculoTipoMedicion->FldTagCaption(3) <> "" ? $this->VehiculoTipoMedicion->FldTagCaption(3) : $this->VehiculoTipoMedicion->CurrentValue;
						break;
					default:
						$this->VehiculoTipoMedicion->ViewValue = $this->VehiculoTipoMedicion->CurrentValue;
				}
			} else {
				$this->VehiculoTipoMedicion->ViewValue = NULL;
			}
			$this->VehiculoTipoMedicion->ViewCustomAttributes = "";

			// VehiculoCondicion
			if (strval($this->VehiculoCondicion->CurrentValue) <> "") {
				switch ($this->VehiculoCondicion->CurrentValue) {
					case $this->VehiculoCondicion->FldTagValue(1):
						$this->VehiculoCondicion->ViewValue = $this->VehiculoCondicion->FldTagCaption(1) <> "" ? $this->VehiculoCondicion->FldTagCaption(1) : $this->VehiculoCondicion->CurrentValue;
						break;
					case $this->VehiculoCondicion->FldTagValue(2):
						$this->VehiculoCondicion->ViewValue = $this->VehiculoCondicion->FldTagCaption(2) <> "" ? $this->VehiculoCondicion->FldTagCaption(2) : $this->VehiculoCondicion->CurrentValue;
						break;
					default:
						$this->VehiculoCondicion->ViewValue = $this->VehiculoCondicion->CurrentValue;
				}
			} else {
				$this->VehiculoCondicion->ViewValue = NULL;
			}
			$this->VehiculoCondicion->ViewCustomAttributes = "";

			// VehiculoKm
			$this->VehiculoKm->ViewValue = $this->VehiculoKm->CurrentValue;
			$this->VehiculoKm->ViewCustomAttributes = "";

			// VehiculoFotoPrincipal
			if (!ew_Empty($this->VehiculoFotoPrincipal->Upload->DbValue)) {
				$this->VehiculoFotoPrincipal->ViewValue = $this->VehiculoFotoPrincipal->Upload->DbValue;
			} else {
				$this->VehiculoFotoPrincipal->ViewValue = "";
			}
			$this->VehiculoFotoPrincipal->ViewCustomAttributes = "";

			// VehiculoFoto2
			if (!ew_Empty($this->VehiculoFoto2->Upload->DbValue)) {
				$this->VehiculoFoto2->ViewValue = $this->VehiculoFoto2->Upload->DbValue;
			} else {
				$this->VehiculoFoto2->ViewValue = "";
			}
			$this->VehiculoFoto2->ViewCustomAttributes = "";

			// VehiculoFoto3
			if (!ew_Empty($this->VehiculoFoto3->Upload->DbValue)) {
				$this->VehiculoFoto3->ViewValue = $this->VehiculoFoto3->Upload->DbValue;
			} else {
				$this->VehiculoFoto3->ViewValue = "";
			}
			$this->VehiculoFoto3->ViewCustomAttributes = "";

			// VehiculoFoto4
			if (!ew_Empty($this->VehiculoFoto4->Upload->DbValue)) {
				$this->VehiculoFoto4->ViewValue = $this->VehiculoFoto4->Upload->DbValue;
			} else {
				$this->VehiculoFoto4->ViewValue = "";
			}
			$this->VehiculoFoto4->ViewCustomAttributes = "";

			// VehiculoFechaBaja
			$this->VehiculoFechaBaja->ViewValue = $this->VehiculoFechaBaja->CurrentValue;
			$this->VehiculoFechaBaja->ViewValue = ew_FormatDateTime($this->VehiculoFechaBaja->ViewValue, 7);
			$this->VehiculoFechaBaja->ViewCustomAttributes = "";

			// VehiculoMotivoBaja
			$this->VehiculoMotivoBaja->ViewValue = $this->VehiculoMotivoBaja->CurrentValue;
			$this->VehiculoMotivoBaja->ViewCustomAttributes = "";

			// VehiculoId
			$this->VehiculoId->LinkCustomAttributes = "";
			$this->VehiculoId->HrefValue = "";
			$this->VehiculoId->TooltipValue = "";

			// VehiculoDominio
			$this->VehiculoDominio->LinkCustomAttributes = "";
			$this->VehiculoDominio->HrefValue = "";
			$this->VehiculoDominio->TooltipValue = "";

			// VehiculoTipo
			$this->VehiculoTipo->LinkCustomAttributes = "";
			$this->VehiculoTipo->HrefValue = "";
			$this->VehiculoTipo->TooltipValue = "";

			// VehiculoDescripcion
			$this->VehiculoDescripcion->LinkCustomAttributes = "";
			$this->VehiculoDescripcion->HrefValue = "";
			$this->VehiculoDescripcion->TooltipValue = "";

			// VehiculoSucursal
			$this->VehiculoSucursal->LinkCustomAttributes = "";
			$this->VehiculoSucursal->HrefValue = "";
			$this->VehiculoSucursal->TooltipValue = "";

			// VehiculoFechaCompra
			$this->VehiculoFechaCompra->LinkCustomAttributes = "";
			$this->VehiculoFechaCompra->HrefValue = "";
			$this->VehiculoFechaCompra->TooltipValue = "";

			// VehiculoProveedor
			$this->VehiculoProveedor->LinkCustomAttributes = "";
			$this->VehiculoProveedor->HrefValue = "";
			$this->VehiculoProveedor->TooltipValue = "";

			// VehiculoMarca
			$this->VehiculoMarca->LinkCustomAttributes = "";
			$this->VehiculoMarca->HrefValue = "";
			$this->VehiculoMarca->TooltipValue = "";

			// VehiculoModelo
			$this->VehiculoModelo->LinkCustomAttributes = "";
			$this->VehiculoModelo->HrefValue = "";
			$this->VehiculoModelo->TooltipValue = "";

			// VehiculoVersion
			$this->VehiculoVersion->LinkCustomAttributes = "";
			$this->VehiculoVersion->HrefValue = "";
			$this->VehiculoVersion->TooltipValue = "";

			// VehiculoChasis
			$this->VehiculoChasis->LinkCustomAttributes = "";
			$this->VehiculoChasis->HrefValue = "";
			$this->VehiculoChasis->TooltipValue = "";

			// VehiculoMotor
			$this->VehiculoMotor->LinkCustomAttributes = "";
			$this->VehiculoMotor->HrefValue = "";
			$this->VehiculoMotor->TooltipValue = "";

			// VehiculoCombustible
			$this->VehiculoCombustible->LinkCustomAttributes = "";
			$this->VehiculoCombustible->HrefValue = "";
			$this->VehiculoCombustible->TooltipValue = "";

			// VehiculoTipoMedicion
			$this->VehiculoTipoMedicion->LinkCustomAttributes = "";
			$this->VehiculoTipoMedicion->HrefValue = "";
			$this->VehiculoTipoMedicion->TooltipValue = "";

			// VehiculoCondicion
			$this->VehiculoCondicion->LinkCustomAttributes = "";
			$this->VehiculoCondicion->HrefValue = "";
			$this->VehiculoCondicion->TooltipValue = "";

			// VehiculoKm
			$this->VehiculoKm->LinkCustomAttributes = "";
			$this->VehiculoKm->HrefValue = "";
			$this->VehiculoKm->TooltipValue = "";

			// VehiculoFotoPrincipal
			$this->VehiculoFotoPrincipal->LinkCustomAttributes = "";
			$this->VehiculoFotoPrincipal->HrefValue = "";
			$this->VehiculoFotoPrincipal->HrefValue2 = $this->VehiculoFotoPrincipal->UploadPath . $this->VehiculoFotoPrincipal->Upload->DbValue;
			$this->VehiculoFotoPrincipal->TooltipValue = "";

			// VehiculoFoto2
			$this->VehiculoFoto2->LinkCustomAttributes = "";
			$this->VehiculoFoto2->HrefValue = "";
			$this->VehiculoFoto2->HrefValue2 = $this->VehiculoFoto2->UploadPath . $this->VehiculoFoto2->Upload->DbValue;
			$this->VehiculoFoto2->TooltipValue = "";

			// VehiculoFoto3
			$this->VehiculoFoto3->LinkCustomAttributes = "";
			$this->VehiculoFoto3->HrefValue = "";
			$this->VehiculoFoto3->HrefValue2 = $this->VehiculoFoto3->UploadPath . $this->VehiculoFoto3->Upload->DbValue;
			$this->VehiculoFoto3->TooltipValue = "";

			// VehiculoFoto4
			$this->VehiculoFoto4->LinkCustomAttributes = "";
			$this->VehiculoFoto4->HrefValue = "";
			$this->VehiculoFoto4->HrefValue2 = $this->VehiculoFoto4->UploadPath . $this->VehiculoFoto4->Upload->DbValue;
			$this->VehiculoFoto4->TooltipValue = "";

			// VehiculoFechaBaja
			$this->VehiculoFechaBaja->LinkCustomAttributes = "";
			$this->VehiculoFechaBaja->HrefValue = "";
			$this->VehiculoFechaBaja->TooltipValue = "";

			// VehiculoMotivoBaja
			$this->VehiculoMotivoBaja->LinkCustomAttributes = "";
			$this->VehiculoMotivoBaja->HrefValue = "";
			$this->VehiculoMotivoBaja->TooltipValue = "";
		}

		// Call Row Rendered event
		if ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)
			$this->Row_Rendered();
	}

	// Set up detail parms based on QueryString
	function SetUpDetailParms() {

		// Get the keys for master table
		if (isset($_GET[EW_TABLE_SHOW_DETAIL])) {
			$sDetailTblVar = $_GET[EW_TABLE_SHOW_DETAIL];
			$this->setCurrentDetailTable($sDetailTblVar);
		} else {
			$sDetailTblVar = $this->getCurrentDetailTable();
		}
		if ($sDetailTblVar <> "") {
			$DetailTblVar = explode(",", $sDetailTblVar);
			if (in_array("vehiculo_cubiertas", $DetailTblVar)) {
				if (!isset($GLOBALS["vehiculo_cubiertas_grid"]))
					$GLOBALS["vehiculo_cubiertas_grid"] = new cvehiculo_cubiertas_grid;
				if ($GLOBALS["vehiculo_cubiertas_grid"]->DetailView) {
					$GLOBALS["vehiculo_cubiertas_grid"]->CurrentMode = "view";

					// Save current master table to detail table
					$GLOBALS["vehiculo_cubiertas_grid"]->setCurrentMasterTable($this->TableVar);
					$GLOBALS["vehiculo_cubiertas_grid"]->setStartRecordNumber(1);
					$GLOBALS["vehiculo_cubiertas_grid"]->VehVehiculo->FldIsDetailKey = TRUE;
					$GLOBALS["vehiculo_cubiertas_grid"]->VehVehiculo->CurrentValue = $this->VehiculoId->CurrentValue;
					$GLOBALS["vehiculo_cubiertas_grid"]->VehVehiculo->setSessionValue($GLOBALS["vehiculo_cubiertas_grid"]->VehVehiculo->CurrentValue);
				}
			}
			if (in_array("veh_vehiculo_sucursal", $DetailTblVar)) {
				if (!isset($GLOBALS["veh_vehiculo_sucursal_grid"]))
					$GLOBALS["veh_vehiculo_sucursal_grid"] = new cveh_vehiculo_sucursal_grid;
				if ($GLOBALS["veh_vehiculo_sucursal_grid"]->DetailView) {
					$GLOBALS["veh_vehiculo_sucursal_grid"]->CurrentMode = "view";

					// Save current master table to detail table
					$GLOBALS["veh_vehiculo_sucursal_grid"]->setCurrentMasterTable($this->TableVar);
					$GLOBALS["veh_vehiculo_sucursal_grid"]->setStartRecordNumber(1);
					$GLOBALS["veh_vehiculo_sucursal_grid"]->Vehiculo->FldIsDetailKey = TRUE;
					$GLOBALS["veh_vehiculo_sucursal_grid"]->Vehiculo->CurrentValue = $this->VehiculoId->CurrentValue;
					$GLOBALS["veh_vehiculo_sucursal_grid"]->Vehiculo->setSessionValue($GLOBALS["veh_vehiculo_sucursal_grid"]->Vehiculo->CurrentValue);
				}
			}
		}
	}

	// Set up Breadcrumb
	function SetupBreadcrumb() {
		global $Breadcrumb, $Language;
		$Breadcrumb = new cBreadcrumb();
		$Breadcrumb->Add("list", $this->TableVar, "veh_vehiculoslist.php", $this->TableVar, TRUE);
		$PageId = "view";
		$Breadcrumb->Add("view", $PageId, ew_CurrentUrl());
	}

	// Page Load event
	function Page_Load() {

		//echo "Page Load";
	}

	// Page Unload event
	function Page_Unload() {

		//echo "Page Unload";
	}

	// Page Redirecting event
	function Page_Redirecting(&$url) {

		// Example:
		//$url = "your URL";

	}

	// Message Showing event
	// $type = ''|'success'|'failure'|'warning'
	function Message_Showing(&$msg, $type) {
		if ($type == 'success') {

			//$msg = "your success message";
		} elseif ($type == 'failure') {

			//$msg = "your failure message";
		} elseif ($type == 'warning') {

			//$msg = "your warning message";
		} else {

			//$msg = "your message";
		}
	}

	// Page Render event
	function Page_Render() {

		//echo "Page Render";
	}

	// Page Data Rendering event
	function Page_DataRendering(&$header) {

		// Example:
		//$header = "your header";

	}

	// Page Data Rendered event
	function Page_DataRendered(&$footer) {

		// Example:
		//$footer = "your footer";

	}
}
?>
<?php ew_Header(FALSE) ?>
<?php

// Create page object
if (!isset($veh_vehiculos_view)) $veh_vehiculos_view = new cveh_vehiculos_view();

// Page init
$veh_vehiculos_view->Page_Init();

// Page main
$veh_vehiculos_view->Page_Main();

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$veh_vehiculos_view->Page_Render();
?>
<?php include_once "header.php" ?>
<script type="text/javascript">

// Page object
var veh_vehiculos_view = new ew_Page("veh_vehiculos_view");
veh_vehiculos_view.PageID = "view"; // Page ID
var EW_PAGE_ID = veh_vehiculos_view.PageID; // For backward compatibility

// Form object
var fveh_vehiculosview = new ew_Form("fveh_vehiculosview");

// Form_CustomValidate event
fveh_vehiculosview.Form_CustomValidate = 
 function(fobj) { // DO NOT CHANGE THIS LINE!

 	// Your custom validation code here, return false if invalid. 
 	return true;
 }

// Use JavaScript validation or not
<?php if (EW_CLIENT_VALIDATE) { ?>
fveh_vehiculosview.ValidateRequired = true;
<?php } else { ?>
fveh_vehiculosview.ValidateRequired = false; 
<?php } ?>

// Dynamic selection lists
fveh_vehiculosview.Lists["x_VehiculoTipo"] = {"LinkField":"x_TipoId","Ajax":true,"AutoFill":false,"DisplayFields":["x_TipoNombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fveh_vehiculosview.Lists["x_VehiculoSucursal"] = {"LinkField":"x_sucursalId","Ajax":true,"AutoFill":false,"DisplayFields":["x_sucursalNombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fveh_vehiculosview.Lists["x_VehiculoProveedor"] = {"LinkField":"x_ProveedorId","Ajax":true,"AutoFill":false,"DisplayFields":["x_ProveedorNombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fveh_vehiculosview.Lists["x_VehiculoMarca"] = {"LinkField":"x_MarcaId","Ajax":true,"AutoFill":false,"DisplayFields":["x_MarcaNombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fveh_vehiculosview.Lists["x_VehiculoModelo"] = {"LinkField":"x_ModeloId","Ajax":true,"AutoFill":false,"DisplayFields":["x_ModeloNombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fveh_vehiculosview.Lists["x_VehiculoVersion"] = {"LinkField":"x_VersionId","Ajax":true,"AutoFill":false,"DisplayFields":["x_VersionNombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fveh_vehiculosview.Lists["x_VehiculoCombustible"] = {"LinkField":"x_CombustibleId","Ajax":true,"AutoFill":false,"DisplayFields":["x_CombustibleNombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};

// Form object for search
</script>
<script type="text/javascript">

// Write your client script here, no need to add script tags.
</script>
<?php $Breadcrumb->Render(); ?>
<div class="ewViewExportOptions">
<?php $veh_vehiculos_view->ExportOptions->Render("body") ?>
<?php if (!$veh_vehiculos_view->ExportOptions->UseDropDownButton) { ?>
</div>
<div class="ewViewOtherOptions">
<?php } ?>
<?php
	foreach ($veh_vehiculos_view->OtherOptions as &$option)
		$option->Render("body");
?>
</div>
<?php $veh_vehiculos_view->ShowPageHeader(); ?>
<?php
$veh_vehiculos_view->ShowMessage();
?>
<form name="fveh_vehiculosview" id="fveh_vehiculosview" class="ewForm form-inline" action="<?php echo ew_CurrentPage() ?>" method="post">
<input type="hidden" name="t" value="veh_vehiculos">
<table class="ewGrid"><tr><td>
<table id="tbl_veh_vehiculosview" class="table table-bordered table-striped">
<?php if ($veh_vehiculos->VehiculoId->Visible) { // VehiculoId ?>
	<tr id="r_VehiculoId">
		<td><span id="elh_veh_vehiculos_VehiculoId"><?php echo $veh_vehiculos->VehiculoId->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoId->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoId" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoId->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoId->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoDominio->Visible) { // VehiculoDominio ?>
	<tr id="r_VehiculoDominio">
		<td><span id="elh_veh_vehiculos_VehiculoDominio"><?php echo $veh_vehiculos->VehiculoDominio->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoDominio->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoDominio" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoDominio->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoDominio->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoTipo->Visible) { // VehiculoTipo ?>
	<tr id="r_VehiculoTipo">
		<td><span id="elh_veh_vehiculos_VehiculoTipo"><?php echo $veh_vehiculos->VehiculoTipo->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoTipo->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoTipo" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoTipo->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoTipo->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoDescripcion->Visible) { // VehiculoDescripcion ?>
	<tr id="r_VehiculoDescripcion">
		<td><span id="elh_veh_vehiculos_VehiculoDescripcion"><?php echo $veh_vehiculos->VehiculoDescripcion->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoDescripcion->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoDescripcion" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoDescripcion->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoDescripcion->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoSucursal->Visible) { // VehiculoSucursal ?>
	<tr id="r_VehiculoSucursal">
		<td><span id="elh_veh_vehiculos_VehiculoSucursal"><?php echo $veh_vehiculos->VehiculoSucursal->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoSucursal->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoSucursal" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoSucursal->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoSucursal->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoFechaCompra->Visible) { // VehiculoFechaCompra ?>
	<tr id="r_VehiculoFechaCompra">
		<td><span id="elh_veh_vehiculos_VehiculoFechaCompra"><?php echo $veh_vehiculos->VehiculoFechaCompra->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoFechaCompra->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoFechaCompra" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoFechaCompra->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoFechaCompra->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoProveedor->Visible) { // VehiculoProveedor ?>
	<tr id="r_VehiculoProveedor">
		<td><span id="elh_veh_vehiculos_VehiculoProveedor"><?php echo $veh_vehiculos->VehiculoProveedor->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoProveedor->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoProveedor" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoProveedor->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoProveedor->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoMarca->Visible) { // VehiculoMarca ?>
	<tr id="r_VehiculoMarca">
		<td><span id="elh_veh_vehiculos_VehiculoMarca"><?php echo $veh_vehiculos->VehiculoMarca->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoMarca->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoMarca" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoMarca->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoMarca->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoModelo->Visible) { // VehiculoModelo ?>
	<tr id="r_VehiculoModelo">
		<td><span id="elh_veh_vehiculos_VehiculoModelo"><?php echo $veh_vehiculos->VehiculoModelo->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoModelo->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoModelo" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoModelo->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoModelo->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoVersion->Visible) { // VehiculoVersion ?>
	<tr id="r_VehiculoVersion">
		<td><span id="elh_veh_vehiculos_VehiculoVersion"><?php echo $veh_vehiculos->VehiculoVersion->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoVersion->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoVersion" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoVersion->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoVersion->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoChasis->Visible) { // VehiculoChasis ?>
	<tr id="r_VehiculoChasis">
		<td><span id="elh_veh_vehiculos_VehiculoChasis"><?php echo $veh_vehiculos->VehiculoChasis->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoChasis->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoChasis" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoChasis->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoChasis->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoMotor->Visible) { // VehiculoMotor ?>
	<tr id="r_VehiculoMotor">
		<td><span id="elh_veh_vehiculos_VehiculoMotor"><?php echo $veh_vehiculos->VehiculoMotor->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoMotor->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoMotor" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoMotor->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoMotor->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoCombustible->Visible) { // VehiculoCombustible ?>
	<tr id="r_VehiculoCombustible">
		<td><span id="elh_veh_vehiculos_VehiculoCombustible"><?php echo $veh_vehiculos->VehiculoCombustible->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoCombustible->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoCombustible" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoCombustible->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoCombustible->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoTipoMedicion->Visible) { // VehiculoTipoMedicion ?>
	<tr id="r_VehiculoTipoMedicion">
		<td><span id="elh_veh_vehiculos_VehiculoTipoMedicion"><?php echo $veh_vehiculos->VehiculoTipoMedicion->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoTipoMedicion->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoTipoMedicion" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoTipoMedicion->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoTipoMedicion->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoCondicion->Visible) { // VehiculoCondicion ?>
	<tr id="r_VehiculoCondicion">
		<td><span id="elh_veh_vehiculos_VehiculoCondicion"><?php echo $veh_vehiculos->VehiculoCondicion->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoCondicion->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoCondicion" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoCondicion->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoCondicion->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoKm->Visible) { // VehiculoKm ?>
	<tr id="r_VehiculoKm">
		<td><span id="elh_veh_vehiculos_VehiculoKm"><?php echo $veh_vehiculos->VehiculoKm->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoKm->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoKm" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoKm->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoKm->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoFotoPrincipal->Visible) { // VehiculoFotoPrincipal ?>
	<tr id="r_VehiculoFotoPrincipal">
		<td><span id="elh_veh_vehiculos_VehiculoFotoPrincipal"><?php echo $veh_vehiculos->VehiculoFotoPrincipal->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoFotoPrincipal->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoFotoPrincipal" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoFotoPrincipal->ViewAttributes() ?>>
<?php if ($veh_vehiculos->VehiculoFotoPrincipal->LinkAttributes() <> "") { ?>
<?php if (!empty($veh_vehiculos->VehiculoFotoPrincipal->Upload->DbValue)) { ?>
<?php echo $veh_vehiculos->VehiculoFotoPrincipal->ViewValue ?>
<?php } elseif (!in_array($veh_vehiculos->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($veh_vehiculos->VehiculoFotoPrincipal->Upload->DbValue)) { ?>
<?php echo $veh_vehiculos->VehiculoFotoPrincipal->ViewValue ?>
<?php } elseif (!in_array($veh_vehiculos->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoFoto2->Visible) { // VehiculoFoto2 ?>
	<tr id="r_VehiculoFoto2">
		<td><span id="elh_veh_vehiculos_VehiculoFoto2"><?php echo $veh_vehiculos->VehiculoFoto2->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoFoto2->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoFoto2" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoFoto2->ViewAttributes() ?>>
<?php if ($veh_vehiculos->VehiculoFoto2->LinkAttributes() <> "") { ?>
<?php if (!empty($veh_vehiculos->VehiculoFoto2->Upload->DbValue)) { ?>
<?php echo $veh_vehiculos->VehiculoFoto2->ViewValue ?>
<?php } elseif (!in_array($veh_vehiculos->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($veh_vehiculos->VehiculoFoto2->Upload->DbValue)) { ?>
<?php echo $veh_vehiculos->VehiculoFoto2->ViewValue ?>
<?php } elseif (!in_array($veh_vehiculos->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoFoto3->Visible) { // VehiculoFoto3 ?>
	<tr id="r_VehiculoFoto3">
		<td><span id="elh_veh_vehiculos_VehiculoFoto3"><?php echo $veh_vehiculos->VehiculoFoto3->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoFoto3->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoFoto3" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoFoto3->ViewAttributes() ?>>
<?php if ($veh_vehiculos->VehiculoFoto3->LinkAttributes() <> "") { ?>
<?php if (!empty($veh_vehiculos->VehiculoFoto3->Upload->DbValue)) { ?>
<?php echo $veh_vehiculos->VehiculoFoto3->ViewValue ?>
<?php } elseif (!in_array($veh_vehiculos->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($veh_vehiculos->VehiculoFoto3->Upload->DbValue)) { ?>
<?php echo $veh_vehiculos->VehiculoFoto3->ViewValue ?>
<?php } elseif (!in_array($veh_vehiculos->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoFoto4->Visible) { // VehiculoFoto4 ?>
	<tr id="r_VehiculoFoto4">
		<td><span id="elh_veh_vehiculos_VehiculoFoto4"><?php echo $veh_vehiculos->VehiculoFoto4->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoFoto4->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoFoto4" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoFoto4->ViewAttributes() ?>>
<?php if ($veh_vehiculos->VehiculoFoto4->LinkAttributes() <> "") { ?>
<?php if (!empty($veh_vehiculos->VehiculoFoto4->Upload->DbValue)) { ?>
<?php echo $veh_vehiculos->VehiculoFoto4->ViewValue ?>
<?php } elseif (!in_array($veh_vehiculos->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($veh_vehiculos->VehiculoFoto4->Upload->DbValue)) { ?>
<?php echo $veh_vehiculos->VehiculoFoto4->ViewValue ?>
<?php } elseif (!in_array($veh_vehiculos->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoFechaBaja->Visible) { // VehiculoFechaBaja ?>
	<tr id="r_VehiculoFechaBaja">
		<td><span id="elh_veh_vehiculos_VehiculoFechaBaja"><?php echo $veh_vehiculos->VehiculoFechaBaja->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoFechaBaja->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoFechaBaja" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoFechaBaja->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoFechaBaja->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoMotivoBaja->Visible) { // VehiculoMotivoBaja ?>
	<tr id="r_VehiculoMotivoBaja">
		<td><span id="elh_veh_vehiculos_VehiculoMotivoBaja"><?php echo $veh_vehiculos->VehiculoMotivoBaja->FldCaption() ?></span></td>
		<td<?php echo $veh_vehiculos->VehiculoMotivoBaja->CellAttributes() ?>>
<span id="el_veh_vehiculos_VehiculoMotivoBaja" class="control-group">
<span<?php echo $veh_vehiculos->VehiculoMotivoBaja->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoMotivoBaja->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
</table>
</td></tr></table>
<?php
	if (in_array("vehiculo_cubiertas", explode(",", $veh_vehiculos->getCurrentDetailTable())) && $vehiculo_cubiertas->DetailView) {
?>
<?php include_once "vehiculo_cubiertasgrid.php" ?>
<?php } ?>
<?php
	if (in_array("veh_vehiculo_sucursal", explode(",", $veh_vehiculos->getCurrentDetailTable())) && $veh_vehiculo_sucursal->DetailView) {
?>
<?php include_once "veh_vehiculo_sucursalgrid.php" ?>
<?php } ?>
</form>
<script type="text/javascript">
fveh_vehiculosview.Init();
</script>
<?php
$veh_vehiculos_view->ShowPageFooter();
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
?>
<script type="text/javascript">

// Write your table-specific startup script here
// document.write("page loaded");

</script>
<?php include_once "footer.php" ?>
<?php
$veh_vehiculos_view->Page_Terminate();
?>
